<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>glTF Sample Viewer</title>

    <meta name="author" content="Khronos Group Inc.">
    <meta name="description" content="The official glTF sample viewer">
    <meta name="keywords" content="glTF, WebGL, Sample, Viewer, PBR">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link rel="stylesheet" href="styles.css">
    <link rel="icon" href="assets/images/gltf.png">

    <script src="libs/dat.gui.min.js"></script>
    <script src="libs/stats.min.js"></script>

    <script src="dist/gltf-reference-viewer.umd.js"></script>
</head>
<script>
function getUrlVars() {
    var vars = {};
    var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
        vars[key] = value;
    });
    return vars;
}

function getUrlParam(parameter, defaultvalue){
    var urlparameter = defaultvalue;
    if(window.location.href.indexOf(parameter) > -1){
        urlparameter = getUrlVars()[parameter];
        }
    return urlparameter;
}
</script>
<!-- Just create a rendering canvas like below and call gltf_rv! -->
<body onload="viewer = gltf_rv.gltf_rv('canvas', 'assets/models/2.0/model-index.json', 'Courtyard of the Doge\'s palace', false, undefined, '', getUrlParam('model','BoomBox'));">
    <div id="gltf-rv-model-spinner"> </div>
    <canvas id="canvas">No Canvas!</canvas>
</body>
</html>
